package com.mapper;

import com.entity.Category;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface CategoryMapper {
    void insertCategory(Category category);
    void deleteCategoryById(Integer id);
    void updateCategory(Category category);
    Category selectCategoryById(Integer id);
    Category selectCategoryByName(String name);
    List<Category> selectCategory();
    List<Category> selectPageCategory(@Param("pageNum")Integer pageNum,
                              @Param("pageSize")Integer pageSize);
    List<Category> selectCategoriesByLevels(Integer levels);
    int countRowsByParentId(Integer parentId);
    List<Category> selectCategoryByChild();
    public List<Category> selectCategoriesByParentId(Integer parent_id);
}
